home *** CD-ROM | disk | FTP | other *** search
/ MacGames Sampler / PHT MacGames Bundle.iso / MacSource Folder / Samples from the CD / C and C++ / Think Power 1.0B4 / Extensions Src / Hello World.c next >
C/C++ Source or Header  |  1993-12-07  |  414b  |  25 lines

  1. // HelloWorld.c - Written by Stefan Arentz, August 1993
  2.  
  3. #include "THINK Power Extensions.h"
  4.  
  5. pascal void main(TPCallbackBlock *theCallbacks, WindowPtr theWindow) {
  6.  
  7.     char                *s = "Hello World!\r";
  8.     Handle                h;
  9.     WindowPtr            newWindow;
  10.  
  11.     if (newWindow = theCallbacks->NewDocument()) {
  12.  
  13.         if (h = NewHandle(13)) {
  14.  
  15.             BlockMove(s, *h, 13);
  16.             
  17.             (void) theCallbacks->Paste(h);
  18.             
  19.             DisposeHandle(h);
  20.         }
  21.  
  22.     }
  23.     
  24. }
  25.